<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<p id="p1">段落1</p>
		<p>段落2</p>
		<h1>11..............11</h1>
		<h2>22..............22</h2>
		<h3>33..............33</h3>
		<p>段落3<span>7788765</span></p>
		<p>段落4</p>
		<p>段落5</p>
		<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			/*var $p=("<p>段落1</p>");
					var $root=$("#root");*/
			//$root.append($p);
			//$root.prepend("<h1>我是标题</h1>");
			/*$root.after("<div id='after' style='color:red;'></div>");
			var aft=$("<div id='after' style='color:red;'></div>");*/
			//$("p,h1").wrapAll("<div></div>");
			$("p").replaceWith($("span"));
			$("span").wrapInner("<div></div>");
			$("#p1").click(function() {
				alert($(this).text());
			});
			var $pc = $("#p1").clone(true).attr("id", "pk").text("我是克隆的");
			$pc.appendTo("body");
			//$("span").empty();
		</script>
	</body>

</html>